<!DOCTYPE HTML PUBLIC "-//ORA//DTD CD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>[Chapter 25] 25.63 java.lang.ThreadGroup (JDK 1.0)</TITLE>
<META NAME="author" CONTENT="David Flanagan">
<META NAME="date" CONTENT="Thu Jul 31 16:27:55 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java">
<META NAME="title" CONTENT="Java in a Nutshell">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java in a Nutshell" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch25_62.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 25<br>The java.lang Package</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch25_64.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=sect1>
<h2 CLASS=sect1><A CLASS="TITLE" NAME="JNUT2-CH-25-SECT-63">25.63 java.lang.ThreadGroup (JDK 1.0)</A></h2>

<DIV CLASS=sect2>
<h3 CLASS=sect2><A CLASS="TITLE" NAME="JNUT2-CH-25-SECT-63.1"></A></h3>
</DIV>

<P CLASS=para>
This class defines a group of threads and allows
operations on the group as a whole. A
<tt CLASS=literal>ThreadGroup</tt> may contain <tt CLASS=literal>Thread</tt> objects,
as well as "child" <tt CLASS=literal>ThreadGroup</tt> objects. All
<tt CLASS=literal>ThreadGroup</tt> objects are created as children of
some other <tt CLASS=literal>ThreadGroup</tt>, and thus there is a
parent/child hierarchy of <tt CLASS=literal>ThreadGroup</tt> objects.

<P CLASS=para>
Some programs may find it convenient to define their own
<tt CLASS=literal>ThreadGroup</tt>, but generally thread groups are only
used by system-level applications.

<DIV CLASS=screen>
<P>
<PRE>
public class <tt CLASS=literal>ThreadGroup</tt> extends Object {
    // <tt CLASS=literal>Public Constructors</tt>
            public <tt CLASS=literal>ThreadGroup</tt>(String <tt CLASS=literal>name</tt>);
            public <tt CLASS=literal>ThreadGroup</tt>(ThreadGroup <tt CLASS=literal>parent</tt>, String <tt CLASS=literal>name</tt>);
    // <tt CLASS=literal>Public Instance Methods</tt>
            public int <tt CLASS=literal>activeCount</tt>();
            public int <tt CLASS=literal>activeGroupCount</tt>();
        <b>1.1</b>public boolean <tt CLASS=literal>allowThreadSuspension</tt>(boolean <tt CLASS=literal>b</tt>);
            public final void <tt CLASS=literal>checkAccess</tt>();
            public final void <tt CLASS=literal>destroy</tt>();
            public int <tt CLASS=literal>enumerate</tt>(Thread[] <tt CLASS=literal>list</tt>);
            public int <tt CLASS=literal>enumerate</tt>(Thread[] <tt CLASS=literal>list</tt>, boolean <tt CLASS=literal>recurse</tt>);
            public int <tt CLASS=literal>enumerate</tt>(ThreadGroup[] <tt CLASS=literal>list</tt>);
            public int <tt CLASS=literal>enumerate</tt>(ThreadGroup[] <tt CLASS=literal>list</tt>, boolean <tt CLASS=literal>recurse</tt>);
            public final int <tt CLASS=literal>getMaxPriority</tt>();
            public final String <tt CLASS=literal>getName</tt>();
            public final ThreadGroup <tt CLASS=literal>getParent</tt>();
            public final boolean <tt CLASS=literal>isDaemon</tt>();
        <b>1.1</b>public synchronized boolean <tt CLASS=literal>isDestroyed</tt>();
            public void <tt CLASS=literal>list</tt>();
            public final boolean <tt CLASS=literal>parentOf</tt>(ThreadGroup <tt CLASS=literal>g</tt>);
            public final void <tt CLASS=literal>resume</tt>();
            public final void <tt CLASS=literal>setDaemon</tt>(boolean <tt CLASS=literal>daemon</tt>);
            public final void <tt CLASS=literal>setMaxPriority</tt>(int <tt CLASS=literal>pri</tt>);
            public final void <tt CLASS=literal>stop</tt>();
            public final void <tt CLASS=literal>suspend</tt>();
            public String <tt CLASS=literal>toString</tt>();  //<tt CLASS=literal> Overrides Object</tt>
            public void <tt CLASS=literal>uncaughtException</tt>(Thread <tt CLASS=literal>t</tt>, Throwable <tt CLASS=literal>e</tt>);
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=sect2>
<h3 CLASS=sect2><A CLASS="TITLE" NAME="JNUT2-CH-25-SECT-63.2">Passed To:</A></h3>

<P CLASS=para>
SecurityManager.checkAccess(), 
Thread(), 
ThreadGroup(), 
ThreadGroup.enumerate(), 
ThreadGroup.parentOf()

</DIV>

<DIV CLASS=sect2>
<h3 CLASS=sect2><A CLASS="TITLE" NAME="JNUT2-CH-25-SECT-63.3">Returned By:</A></h3>

<P CLASS=para>
SecurityManager.getThreadGroup(), 
Thread.getThreadGroup(), 
ThreadGroup.getParent()

</DIV>

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch25_62.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch25_64.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>java.lang.ThreadDeath (JDK 1.0)</td>
<td width=171 align=center valign=top><a href="index/idx_0.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>java.lang.Throwable (JDK 1.0)</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
